package com.fire.control.system.dto;

import java.io.Serializable;
import java.util.Date;

import com.fire.control.system.entity.WarningInfo;

public class DeviceMaintenceDTO implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private String warningId;
	
	private String warningDesc;
	
	private String warningType;
	
	private Date startTime;
	
	private String solutionDesc;
	
	private String trustees;
	
	private Date endTime;
	
	private String currentStatus;
	
	private String deviceId;
	
	private String deviceName;
	
	private String address;
	
	private String location;
	
	private String deviceType;
	
	private String groupName;
	
	private String manager;
	
	private String telNumber;
	
	// 设备编号
	private String serialNumber;
	// 网关编号
	private String gatewayNum;
	// 状态
	private Boolean status;
	
	private String solutionType;
	
	
	public String getSolutionType() {
		return solutionType;
	}

	public void setSolutionType(String solutionType) {
		this.solutionType = solutionType;
	}

	public String getManager() {
		return manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

	public String getTelNumber() {
		return telNumber;
	}

	public void setTelNumber(String telNumber) {
		this.telNumber = telNumber;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	/*public Type_Solution getSolutionType() {
		return solutionType;
	}

	public void setSolutionType(Type_Solution solutionType) {
		this.solutionType = solutionType;
	}*/


	public String getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(String deviceType) {
		this.deviceType = deviceType;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}

	public String getGatewayNum() {
		return gatewayNum;
	}

	public void setGatewayNum(String gatewayNum) {
		this.gatewayNum = gatewayNum;
	}

	public String getWarningId() {
		return warningId;
	}

	public void setWarningId(String warningId) {
		this.warningId = warningId;
	}

	public String getWarningDesc() {
		return warningDesc;
	}

	public void setWarningDesc(String warningDesc) {
		this.warningDesc = warningDesc;
	}
	
	

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public String getSolutionDesc() {
		return solutionDesc;
	}

	public void setSolutionDesc(String solutionDesc) {
		this.solutionDesc = solutionDesc;
	}

	public String getTrustees() {
		return trustees;
	}

	public void setTrustees(String trustees) {
		this.trustees = trustees;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	

	/*public Status_Warning getCurrentStatus() {
		return currentStatus;
	}

	public void setCurrentStatus(Status_Warning currentStatus) {
		this.currentStatus = currentStatus;
	}*/
	
	public String getWarningType() {
		return warningType;
	}

	public void setWarningType(String warningType) {
		this.warningType = warningType;
	}

	public String getCurrentStatus() {
		return currentStatus;
	}

	public void setCurrentStatus(String currentStatus) {
		this.currentStatus = currentStatus;
	}

	public void setWarningInfo(WarningInfo warningInfo) {
		this.deviceId = warningInfo.getTargetDevice().getId();
		this.deviceName = warningInfo.getTargetDevice().getDeviceName();
		this.deviceType = warningInfo.getTargetDevice().getDeviceType().getId();
		this.serialNumber = warningInfo.getTargetDevice().getSerialNumber();
//		this.gatewayNum = warningInfo.getTargetDevice().getGatewayNum();  //此项暂无
		this.warningId = warningInfo.getId();
		this.warningDesc = warningInfo.getWarningDesc();
		this.warningType = warningInfo.getWarningType();
		this.startTime = warningInfo.getStartTime();
		this.trustees = warningInfo.getTrustees();
		this.endTime = warningInfo.getEndTime();
		this.currentStatus = warningInfo.getCurrentStatus().getText();
		//this.solutionType = warningInfo.getSolution();
		if(warningInfo.getTargetDevice() != null) {
			this.address = warningInfo.getTargetDevice().getAddress();
			//this.location = warningInfo.getTargetDevice().getLocation();
			if(warningInfo.getTargetDevice().getDeviceGroup() != null) {
				this.groupName = warningInfo.getTargetDevice().getDeviceGroup().getGroupName();
			}
		}
		//this.manager = ??  //负责人，此项数据如何获取？
		//this.telNumber = ??  //负责人号码，此项数据如何获取？
	}
	

}
